package com.njym.annotation;

import com.njym.annotation.Impl.ExistCheckImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 校验订单号是否已经存在
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Constraint(validatedBy = ExistCheckImpl.class)
public @interface ExistCheck {
	String message() default "该订单号已存在！";

	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };
}
